package com.yugao.fintech.draper.security.customizer;

import com.yugao.fintech.draper.security.handler.UrlAuthenticationFailureHandler;
import org.springframework.security.config.Customizer;
import org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2ClientAuthenticationConfigurer;

public class OAuth2ClientAuthenticationConfigurerCustomizer implements Customizer<OAuth2ClientAuthenticationConfigurer> {

	/**
	 * @param oAuth2ClientAuthenticationConfigurer the input argument
	 */
	@Override
	public void customize(OAuth2ClientAuthenticationConfigurer oAuth2ClientAuthenticationConfigurer) {
		oAuth2ClientAuthenticationConfigurer
			// 登录失败处理
			.errorResponseHandler(new UrlAuthenticationFailureHandler());
	}
}
